#
#  OSPFv2 route test suite Makefile
#

#----------------------------------------------------------- SETUP

VERSION = 0.2.1
TOPDIR = ../../../../../../..
include $(TOPDIR)/Makefile.common

JAVAC = javac -classpath $(SSFNET_TEST_CLASSPATH)
JAVA  = java  -classpath $(SSFNET_TEST_CLASSPATH)

# This is for the cygwin environment which has trouble with the mix of
# slashes and backslashes... Take care, that the classpath is set correctly!
ifeq ($(OSTYPE), cygwin)
JAVAC = javac
JAVA  = java
endif

SHARED=../shared
VERDICT=$(SHARED)/verdict.pl
REPORT=report.log
COMPLETE=complete.log

#TESTS=01_prefer_intra 02_inter_transit 03_forw_address \
#04_asbr_multi_intra 05_prefer_internal 06_ase_type_1_2 \
#07_asbr_intra_1583 08_asbr_intra_no1583 \
#09_multi_asbr_inter

TESTS=
#----------------------------------------------------------- MAKE tests
tests:
	@list='$(TESTS)'; for testcase in $$list; do \
	(cd $$testcase && $(MAKE))\
	done;
	@$(VERDICT) route.ospf.v4.ip $(REPORT) $(TESTS) > $(REPORT)
	@cat $(REPORT)

#----------------------------------------------------------- MAKE report
report:
	@echo "######## Complete Test Report for route.ospf.v4.ip ########" > $(COMPLETE)
	@list='$(TESTS)'; for testcase in $$list; do \
	(cat $$testcase/report.log >> $(COMPLETE))\
	done;
	@cat $(REPORT) >> $(COMPLETE)
	
#----------------------------------------------------------- MAKE clean
clean:
	rm -f *.log *.tcpdump *.dump *.bak
	@list='$(TESTS)'; for testcase in $$list; do \
	(cd $$testcase && $(MAKE) clean)\
	done;